package com.example.design_pattern.builder;

/**
 * 没有使用抽象的建造者，直接使用具体的建造者
 */
public class DialogBuiler {

    private Dialog dialog = new Dialog();

    public DialogBuiler buildTitle(String title){
        dialog.setTitle(title);
        return this;
    }

    public DialogBuiler buildMessage(String msg){
        dialog.setMessage(msg);
        return this;
    }

    public DialogBuiler buildPositiveButton(int btn){
        dialog.setPositveButton(btn);
        return this;
    }

    public DialogBuiler buildNavagationButton(int btn){
        dialog.setNavagationButton(btn);
        return this;
    }

    public Dialog create(){
        return dialog;
    }

}
